﻿using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using PLCSimulator.Editor;
namespace PLCSimulator
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainView : Window
    {
        public MainView()
        {
            InitializeComponent();
            Editor = new Editor.Editor(this.Diagram);
            this.DataContext = Editor;
        }

        public Editor.Editor Editor { get; set; } 

        private void DescriptorMouseDown(object sender, MouseButtonEventArgs e)
        {
            Editor.DescriptorMouseDown((FrameworkElement)sender, e);
        }

        private void DescriptorMouseUp(object sender, MouseButtonEventArgs e)
        {

        }

        private void DescriptorMouseMove(object sender, MouseEventArgs e)
        {

        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            var count=listView.Items.Count;
        }

        private void DiagramDrop(object sender, DragEventArgs e)
        {
            Editor.DiagramDrop(e);
        }
    }
}